package com.ssmIntegration.config;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

public class SpringIoCInit extends AbstractAnnotationConfigDispatcherServletInitializer {

    // 指定rootIoC容器的配置类
    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class[] {DataSourceJavaConfig.class, MapperJavaConfig1.class, ServiceJavaConfig.class};
    }

    // 指定WebIoC容器的配置类
    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class[] {WebMVCJavaConfig.class};
    }

    @Override
    protected String[] getServletMappings() {
        return new String[] {"/"};
    }
}
